package hDOJ;

import java.util.Scanner;

public class Main2012 {

        public static void main(String[] args) {
            Scanner sn = new Scanner(System.in);
            while (sn.hasNext()) {
                int x = sn.nextInt();
                int y = sn.nextInt();
                boolean flag = false;//全是质数标记为false
                
                if (!(x == 0 && y == 0)) {  
                    for(int i = x; i <= y; i++) {               
                        int val = i*i + i + 41; //公式计算 ，表达式 n^2+n+41
                        
                        for (int j = 2; j < val; j++) {  //判断质数
                            if (val % j == 0) {
                                flag = true;
                            }
                        }
                    }
                    if (flag == false) {
                        System.out.println("OK");
                    } else
                        System.out.println("Sorry");
                }
            }
        }
    }